Skip to content

Commit

Permalink
Updated for MC 1.17
Browse files Browse the repository at this point in the history
Many fixes, completely reworked storage system, added ability to change block break sound.
  • Loading branch information
playajames committed Jul 5, 2021
1 parent 3e28509 commit d99c592
Show file tree
Hide file tree
Showing 18 changed files with 414 additions and 207 deletions.
226 changes: 226 additions & 0 deletions ExampleBlock/Transparent Block Example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
{
"credit": "Made with Blockbench by playajames",
"textures": {
"1": "ExampleBlock/face",
"2": "ExampleBlock/border",
"particle": "ExampleBlock/border"
},
"elements": [
{
"from": [1, 0, 0],
"to": [15, 1, 1],
"faces": {
"north": {"uv": [0, 0, 14, 1], "texture": "#2"},
"east": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"south": {"uv": [0, 0, 14, 1], "texture": "#2"},
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"up": {"uv": [0, 0, 14, 1], "texture": "#2"},
"down": {"uv": [0, 0, 14, 1], "texture": "#2"}
}
},
{
"from": [1, 15, 0],
"to": [15, 16, 1],
"faces": {
"north": {"uv": [0, 0, 14, 1], "texture": "#2"},
"east": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"south": {"uv": [0, 0, 14, 1], "texture": "#2"},
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"up": {"uv": [0, 0, 14, 1], "texture": "#2"},
"down": {"uv": [0, 0, 14, 1], "texture": "#2"}
}
},
{
"from": [1, 15, 15],
"to": [15, 16, 16],
"faces": {
"north": {"uv": [0, 0, 14, 1], "texture": "#2"},
"east": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"south": {"uv": [0, 0, 14, 1], "texture": "#2"},
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"up": {"uv": [0, 0, 14, 1], "texture": "#2"},
"down": {"uv": [0, 0, 14, 1], "texture": "#2"}
}
},
{
"from": [1, 0, 15],
"to": [15, 1, 16],
"faces": {
"north": {"uv": [0, 0, 14, 1], "texture": "#2"},
"east": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"south": {"uv": [0, 0, 14, 1], "texture": "#2"},
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"up": {"uv": [0, 0, 14, 1], "texture": "#2"},
"down": {"uv": [0, 0, 14, 1], "texture": "#2"}
}
},
{
"from": [15, 0, 0],
"to": [16, 1, 16],
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#2"},
"east": {"uv": [0, 0, 16, 1], "texture": "#2"},
"south": {"uv": [0, 0, 1, 1], "texture": "#2"},
"west": {"uv": [0, 0, 16, 1], "texture": "#2"},
"up": {"uv": [0, 0, 16, 1], "rotation": 270, "texture": "#2"},
"down": {"uv": [0, 0, 16, 1], "rotation": 90, "texture": "#2"}
}
},
{
"from": [15, 15, 1],
"to": [16, 16, 15],
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"east": {"uv": [0, 0, 14, 1], "texture": "#2"},
"south": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"west": {"uv": [0, 0, 14, 1], "texture": "#2"},
"up": {"uv": [0, 0, 14, 1], "rotation": 270, "texture": "#2"},
"down": {"uv": [0, 0, 14, 1], "rotation": 90, "texture": "#2"}
}
},
{
"from": [0, 15, 1],
"to": [1, 16, 15],
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"east": {"uv": [0, 0, 14, 1], "texture": "#2"},
"south": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"west": {"uv": [0, 0, 14, 1], "texture": "#2"},
"up": {"uv": [0, 0, 14, 1], "rotation": 270, "texture": "#2"},
"down": {"uv": [0, 0, 14, 1], "rotation": 90, "texture": "#2"}
}
},
{
"from": [0, 0, 0],
"to": [1, 1, 16],
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#2"},
"east": {"uv": [0, 0, 16, 1], "texture": "#2"},
"south": {"uv": [0, 0, 1, 1], "texture": "#2"},
"west": {"uv": [0, 0, 16, 1], "texture": "#2"},
"up": {"uv": [0, 0, 16, 1], "rotation": 270, "texture": "#2"},
"down": {"uv": [0, 0, 16, 1], "rotation": 90, "texture": "#2"}
}
},
{
"from": [0, 1, 15],
"to": [1, 16, 16],
"faces": {
"north": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#2"},
"east": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#2"},
"south": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#2"},
"west": {"uv": [0, 0, 15, 1], "rotation": 270, "texture": "#2"},
"up": {"uv": [0, 0, 1, 1], "texture": "#2"},
"down": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#missing"}
}
},
{
"from": [0, 1, 0],
"to": [1, 16, 1],
"faces": {
"north": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#2"},
"east": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#2"},
"south": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#2"},
"west": {"uv": [0, 0, 15, 1], "rotation": 270, "texture": "#2"},
"up": {"uv": [0, 0, 1, 1], "texture": "#2"},
"down": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#missing"}
}
},
{
"from": [15, 1, 0],
"to": [16, 16, 1],
"faces": {
"north": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#2"},
"east": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#2"},
"south": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#2"},
"west": {"uv": [0, 0, 15, 1], "rotation": 270, "texture": "#2"},
"up": {"uv": [0, 0, 1, 1], "texture": "#2"},
"down": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#missing"}
}
},
{
"from": [15, 1, 15],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#2"},
"east": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#2"},
"south": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#2"},
"west": {"uv": [0, 0, 15, 1], "rotation": 270, "texture": "#2"},
"up": {"uv": [0, 0, 1, 1], "texture": "#2"},
"down": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#missing"}
}
},
{
"from": [1, 1, 1],
"to": [1, 15, 15],
"faces": {
"north": {"uv": [0, 0, 0, 14], "texture": "#2"},
"east": {"uv": [0, 0, 14, 14], "texture": "#1"},
"south": {"uv": [0, 0, 0, 14], "texture": "#2"},
"west": {"uv": [0, 0, 14, 14], "texture": "#1"},
"up": {"uv": [0, 0, 0, 14], "texture": "#2"},
"down": {"uv": [0, 0, 0, 14], "texture": "#2"}
}
},
{
"from": [15, 1, 1],
"to": [15, 15, 15],
"faces": {
"north": {"uv": [0, 0, 0, 14], "texture": "#missing"},
"east": {"uv": [0, 0, 14, 14], "texture": "#1"},
"south": {"uv": [0, 0, 0, 14], "texture": "#missing"},
"west": {"uv": [0, 0, 14, 14], "texture": "#1"},
"up": {"uv": [0, 0, 0, 14], "texture": "#missing"},
"down": {"uv": [0, 0, 0, 14], "texture": "#missing"}
}
},
{
"from": [1, 1, 1],
"to": [15, 15, 1],
"faces": {
"north": {"uv": [0, 0, 14, 14], "texture": "#1"},
"east": {"uv": [0, 0, 0, 14], "texture": "#missing"},
"south": {"uv": [0, 0, 14, 14], "texture": "#1"},
"west": {"uv": [0, 0, 0, 14], "texture": "#missing"},
"up": {"uv": [0, 0, 0, 14], "rotation": 270, "texture": "#missing"},
"down": {"uv": [0, 0, 0, 14], "rotation": 90, "texture": "#missing"}
}
},
{
"from": [1, 1, 15],
"to": [15, 15, 15],
"faces": {
"north": {"uv": [0, 0, 14, 14], "texture": "#1"},
"east": {"uv": [0, 0, 0, 14], "texture": "#missing"},
"south": {"uv": [0, 0, 14, 14], "texture": "#1"},
"west": {"uv": [0, 0, 0, 14], "texture": "#missing"},
"up": {"uv": [0, 0, 0, 14], "rotation": 270, "texture": "#missing"},
"down": {"uv": [0, 0, 0, 14], "rotation": 90, "texture": "#missing"}
}
},
{
"from": [1, 15, 1],
"to": [15, 15, 15],
"faces": {
"north": {"uv": [0, 0, 0, 14], "rotation": 90, "texture": "#missing"},
"east": {"uv": [0, 0, 0, 14], "rotation": 90, "texture": "#missing"},
"south": {"uv": [0, 0, 0, 14], "rotation": 90, "texture": "#missing"},
"west": {"uv": [0, 0, 0, 14], "rotation": 270, "texture": "#missing"},
"up": {"uv": [0, 0, 14, 14], "texture": "#1"},
"down": {"uv": [0, 0, 14, 14], "rotation": 180, "texture": "#1"}
}
},
{
"from": [1, 1, 1],
"to": [15, 1, 15],
"faces": {
"north": {"uv": [0, 0, 0, 14], "rotation": 90, "texture": "#missing"},
"east": {"uv": [0, 0, 0, 14], "rotation": 90, "texture": "#missing"},
"south": {"uv": [0, 0, 0, 14], "rotation": 90, "texture": "#missing"},
"west": {"uv": [0, 0, 0, 14], "rotation": 270, "texture": "#missing"},
"up": {"uv": [0, 0, 14, 14], "texture": "#1"},
"down": {"uv": [0, 0, 14, 14], "rotation": 180, "texture": "#1"}
}
}
]
}
Binary file added ExampleBlock/border.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ExampleBlock/face.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 18 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.playajames</groupId>
<artifactId>OraxenTransparentBlocks</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>OraxenTransparentBlocks</name>
Expand Down Expand Up @@ -79,21 +79,32 @@

<dependencies>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.16.1-R0.1-SNAPSHOT</version>
<version>1.17-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.JavaFactoryDev</groupId>
<artifactId>LightningStorage</artifactId>
<version>3.1.5</version>
<groupId>com.github.simplix-softworks</groupId>
<artifactId>simplixstorage</artifactId>
<version>3.2.3</version>
</dependency>
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.4-SNAPSHOT</version>
<version>7.0.6-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.jorel.CommandAPI</groupId>
<artifactId>commandapi-core</artifactId>
<version>6.0.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.34.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.bukkit.event.HandlerList;
import org.bukkit.inventory.ItemStack;

public class OraxenTransparentBlockBreakEvent extends Event implements Cancellable {
public class OraxenTransparentBlockBreakEvent extends Event {

private static final HandlerList handlers = new HandlerList();
private boolean canceled;
Expand All @@ -34,16 +34,6 @@ public Location getLocation() {
return location;
}

@Override
public boolean isCancelled() {
return canceled;
}

@Override
public void setCancelled(boolean canceled) {
this.canceled = canceled;
}

@Override
public HandlerList getHandlers() {
return handlers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,35 @@

import me.playajames.oraxentransparentblocks.OraxenTransparentBlock;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.inventory.ItemStack;

public class OraxenTransparentBlockPlaceEvent extends Event implements Cancellable {
public class OraxenTransparentBlockPlaceEvent extends Event {

private static final HandlerList handlers = new HandlerList();
private boolean canceled;
private Player player;
private ItemStack item;
private OraxenTransparentBlock block;

public OraxenTransparentBlockPlaceEvent(Player player, OraxenTransparentBlock block) {
public OraxenTransparentBlockPlaceEvent(Player player, ItemStack item, OraxenTransparentBlock block) {
this.player = player;
this.block = block;
this.item = item;
this.canceled = false;
}

public Player getPlayer() {
return player;
}

public OraxenTransparentBlock getBlock() {
return block;
}

@Override
public boolean isCancelled() {
return canceled;
public ItemStack getItem() {
return item;
}

@Override
public void setCancelled(boolean canceled) {
this.canceled = canceled;
public OraxenTransparentBlock getBlock() {
return block;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public ItemStack getItem() {
return item;
}

public void setItem(ItemStack item) {
this.item = item;
}

public Location getLocation() {
return location;
}
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit d99c592

Please sign in to comment.