fixed a bunch of typos and added sounds :D
This commit is contained in:
parent
33a1396208
commit
63db9920b2
|
@ -4,8 +4,15 @@
|
||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="9d600e86-9aa6-49ee-bbc5-e23128c6a4d1" name="Changes" comment="Finally fixed a dumb sync issue :D">
|
<list default="true" id="9d600e86-9aa6-49ee-bbc5-e23128c6a4d1" name="Changes" comment="one texture file was missing">
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/sounds.json" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/sounds/toaster_lock.ogg" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/sounds/toaster_release.ogg" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/Tastytoasters.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/Tastytoasters.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/block/ToasterBlock.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/block/ToasterBlock.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/block/ToasterBlockEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/block/ToasterBlockEntity.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/lang/en_us.json" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/lang/en_us.json" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
@ -98,7 +105,7 @@
|
||||||
<recent name="$PROJECT_DIR$/Temp" />
|
<recent name="$PROJECT_DIR$/Temp" />
|
||||||
</key>
|
</key>
|
||||||
</component>
|
</component>
|
||||||
<component name="RunManager" selected="Gradle.tastytoasters [runClient]">
|
<component name="RunManager" selected="Gradle.tastytoasters [build]">
|
||||||
<configuration name="tastytoasters [buildDependents]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
<configuration name="tastytoasters [buildDependents]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||||
<ExternalSystemSettings>
|
<ExternalSystemSettings>
|
||||||
<option name="executionName" />
|
<option name="executionName" />
|
||||||
|
@ -195,8 +202,8 @@
|
||||||
</list>
|
</list>
|
||||||
<recent_temporary>
|
<recent_temporary>
|
||||||
<list>
|
<list>
|
||||||
<item itemvalue="Gradle.tastytoasters [buildDependents]" />
|
|
||||||
<item itemvalue="Gradle.tastytoasters [build]" />
|
<item itemvalue="Gradle.tastytoasters [build]" />
|
||||||
|
<item itemvalue="Gradle.tastytoasters [buildDependents]" />
|
||||||
<item itemvalue="Gradle.tastytoasters [runClient]" />
|
<item itemvalue="Gradle.tastytoasters [runClient]" />
|
||||||
</list>
|
</list>
|
||||||
</recent_temporary>
|
</recent_temporary>
|
||||||
|
@ -280,7 +287,14 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1641323089333</updated>
|
<updated>1641323089333</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="11" />
|
<task id="LOCAL-00011" summary="one texture file was missing">
|
||||||
|
<created>1641398298085</created>
|
||||||
|
<option name="number" value="00011" />
|
||||||
|
<option name="presentableId" value="LOCAL-00011" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1641398298085</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="12" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
|
@ -306,6 +320,7 @@
|
||||||
<MESSAGE value="Its pretty much finished?" />
|
<MESSAGE value="Its pretty much finished?" />
|
||||||
<MESSAGE value="welll it seems there is a fabric api bug" />
|
<MESSAGE value="welll it seems there is a fabric api bug" />
|
||||||
<MESSAGE value="Finally fixed a dumb sync issue :D" />
|
<MESSAGE value="Finally fixed a dumb sync issue :D" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Finally fixed a dumb sync issue :D" />
|
<MESSAGE value="one texture file was missing" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="one texture file was missing" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -11,6 +11,7 @@ import net.minecraft.block.entity.BlockEntityType;
|
||||||
import net.minecraft.item.BlockItem;
|
import net.minecraft.item.BlockItem;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemGroup;
|
import net.minecraft.item.ItemGroup;
|
||||||
|
import net.minecraft.sound.SoundEvent;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
|
|
||||||
|
@ -25,6 +26,11 @@ public class Tastytoasters implements ModInitializer {
|
||||||
public static final ToasterBlock TOASTER_BLOCK = new ToasterBlock(FabricBlockSettings.of(Material.METAL).hardness(4.0f).requiresTool());
|
public static final ToasterBlock TOASTER_BLOCK = new ToasterBlock(FabricBlockSettings.of(Material.METAL).hardness(4.0f).requiresTool());
|
||||||
|
|
||||||
public static BlockEntityType<ToasterBlockEntity> TOASTER_BLOCK_ENTITY;
|
public static BlockEntityType<ToasterBlockEntity> TOASTER_BLOCK_ENTITY;
|
||||||
|
|
||||||
|
public static final Identifier TOASTER_LOCK_SOUND_ID = new Identifier("tastytoasters:toaster_lock");
|
||||||
|
public static final Identifier TOASTER_RELEASE_SOUND_ID = new Identifier("tastytoasters:toaster_release");
|
||||||
|
public static SoundEvent TOASTER_LOCK_SOUND_EVENT = new SoundEvent(TOASTER_LOCK_SOUND_ID);
|
||||||
|
public static SoundEvent TOASTER_RELEASE_SOUND_EVENT = new SoundEvent(TOASTER_RELEASE_SOUND_ID);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
|
@ -38,5 +44,8 @@ public class Tastytoasters implements ModInitializer {
|
||||||
Registry.register(Registry.ITEM, new Identifier("tastytoasters", "toaster"), new BlockItem(TOASTER_BLOCK, new Item.Settings().group(ItemGroup.FOOD)));
|
Registry.register(Registry.ITEM, new Identifier("tastytoasters", "toaster"), new BlockItem(TOASTER_BLOCK, new Item.Settings().group(ItemGroup.FOOD)));
|
||||||
|
|
||||||
TOASTER_BLOCK_ENTITY = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier("tastytoasters", "toaster_entity"), FabricBlockEntityTypeBuilder.create(ToasterBlockEntity::new, TOASTER_BLOCK).build(null));
|
TOASTER_BLOCK_ENTITY = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier("tastytoasters", "toaster_entity"), FabricBlockEntityTypeBuilder.create(ToasterBlockEntity::new, TOASTER_BLOCK).build(null));
|
||||||
|
|
||||||
|
Registry.register(Registry.SOUND_EVENT, TOASTER_LOCK_SOUND_ID, TOASTER_LOCK_SOUND_EVENT);
|
||||||
|
Registry.register(Registry.SOUND_EVENT, TOASTER_RELEASE_SOUND_ID, TOASTER_RELEASE_SOUND_EVENT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import net.minecraft.block.entity.BlockEntityTicker;
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemPlacementContext;
|
import net.minecraft.item.ItemPlacementContext;
|
||||||
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.state.StateManager;
|
import net.minecraft.state.StateManager;
|
||||||
import net.minecraft.state.property.BooleanProperty;
|
import net.minecraft.state.property.BooleanProperty;
|
||||||
import net.minecraft.state.property.DirectionProperty;
|
import net.minecraft.state.property.DirectionProperty;
|
||||||
|
@ -40,6 +41,16 @@ public class ToasterBlock extends BlockWithEntity implements BlockEntityProvider
|
||||||
player.getStackInHand(hand).setCount(player.getStackInHand(hand).getCount()-1);
|
player.getStackInHand(hand).setCount(player.getStackInHand(hand).getCount()-1);
|
||||||
world.setBlockState(pos, state.with(TOASTING, true));
|
world.setBlockState(pos, state.with(TOASTING, true));
|
||||||
toasterBlockEntity.handleUse();
|
toasterBlockEntity.handleUse();
|
||||||
|
if (!world.isClient) {
|
||||||
|
world.playSound(
|
||||||
|
null,
|
||||||
|
pos,
|
||||||
|
Tastytoasters.TOASTER_LOCK_SOUND_EVENT,
|
||||||
|
SoundCategory.BLOCKS,
|
||||||
|
1.0F,
|
||||||
|
1.0F
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ActionResult.success(world.isClient());
|
return ActionResult.success(world.isClient());
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import net.minecraft.block.entity.BlockEntity;
|
||||||
import net.minecraft.entity.ItemEntity;
|
import net.minecraft.entity.ItemEntity;
|
||||||
import net.minecraft.nbt.NbtCompound;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@ -19,16 +20,26 @@ public class ToasterBlockEntity extends BlockEntity {
|
||||||
|
|
||||||
public static void tick(World world, BlockPos pos, BlockState state, ToasterBlockEntity be) {
|
public static void tick(World world, BlockPos pos, BlockState state, ToasterBlockEntity be) {
|
||||||
if (state.get(ToasterBlock.TOASTING)) {
|
if (state.get(ToasterBlock.TOASTING)) {
|
||||||
if (be.cookTicks % 100 == 0) {
|
if (be.cookTicks % 50 == 0) {
|
||||||
world.addParticle(ParticleTypes.SMOKE, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 0, 0, 0);
|
world.addParticle(ParticleTypes.SMOKE, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 0, 0, 0);
|
||||||
}
|
}
|
||||||
if (be.cookTicks <= 0) {
|
if (be.cookTicks <= 0) {
|
||||||
world.setBlockState(pos, state.with(ToasterBlock.TOASTING, false));
|
world.setBlockState(pos, state.with(ToasterBlock.TOASTING, false));
|
||||||
if ((int) (Math.random() * 10) == 0) {
|
if (!world.isClient) {
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY() + 0.5, pos.getZ(), Tastytoasters.BURNT_TOAST_ITEM.getDefaultStack()));
|
world.playSound(
|
||||||
} else {
|
null,
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY() + 0.5, pos.getZ(), Tastytoasters.TOAST_ITEM.getDefaultStack()));
|
pos,
|
||||||
}
|
Tastytoasters.TOASTER_RELEASE_SOUND_EVENT,
|
||||||
|
SoundCategory.BLOCKS,
|
||||||
|
1.0F,
|
||||||
|
1.0F
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if ((int) (Math.random() * 10) == 0) {
|
||||||
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY() + 0.5, pos.getZ(), Tastytoasters.BURNT_TOAST_ITEM.getDefaultStack()));
|
||||||
|
} else {
|
||||||
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY() + 0.5, pos.getZ(), Tastytoasters.TOAST_ITEM.getDefaultStack()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
be.cookTicks--;
|
be.cookTicks--;
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,13 @@
|
||||||
"item.tastytoasters.toast.tooltip": "Tasty but you can do better",
|
"item.tastytoasters.toast.tooltip": "Tasty but you can do better",
|
||||||
"item.tastytoasters.burnt_toast": "Burnt Toast",
|
"item.tastytoasters.burnt_toast": "Burnt Toast",
|
||||||
"item.tastytoasters.burnt_toast.tooltip": "What have you done??",
|
"item.tastytoasters.burnt_toast.tooltip": "What have you done??",
|
||||||
"item.tastytoasters.butter": "Butter,",
|
"item.tastytoasters.butter": "Butter",
|
||||||
"item.tastytoasters.butter.tooltip.1": "A yummy ingredient that",
|
"item.tastytoasters.butter.tooltip.1": "A yummy ingredient that",
|
||||||
"item.tastytoasters.butter.tooltip.2": "inherits milk properties",
|
"item.tastytoasters.butter.tooltip.2": "inherits milk properties",
|
||||||
"item.tastytoasters.buttered_toast": "Buttered Toast",
|
"item.tastytoasters.buttered_toast": "Buttered Toast",
|
||||||
"item.tastytoasters.buttered_toast.tooltip": "So great, but not shiny enough",
|
"item.tastytoasters.buttered_toast.tooltip": "So great, but not shiny enough",
|
||||||
"block.tastytoasters.toaster": "Toaster",
|
"block.tastytoasters.toaster": "Toaster",
|
||||||
"block.tastytoasters.toaster.tooltip": "The gate to happiness"
|
"block.tastytoasters.toaster.tooltip": "The gate to happiness",
|
||||||
|
"subtitles.tastytoasters.toaster_lock": "Toaster locks",
|
||||||
|
"subtitles.tastytoasters.toaster_release": "Toaster releases"
|
||||||
}
|
}
|
14
src/main/resources/assets/tastytoasters/sounds.json
Normal file
14
src/main/resources/assets/tastytoasters/sounds.json
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"toaster_lock": {
|
||||||
|
"subtitle": "subtitles.tastytoasters.toaster_lock",
|
||||||
|
"sounds": [
|
||||||
|
"tastytoasters:toaster_lock"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"toaster_release": {
|
||||||
|
"subtitle": "subtitles.tastytoasters.toaster_release",
|
||||||
|
"sounds": [
|
||||||
|
"tastytoasters:toaster_release"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
BIN
src/main/resources/assets/tastytoasters/sounds/toaster_lock.ogg
Normal file
BIN
src/main/resources/assets/tastytoasters/sounds/toaster_lock.ogg
Normal file
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue